<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--引入jquery，jquery.qrcode-->
    <script type='text/javascript'src='http://cdn.staticfile.org/jquery/2.1.1/jquery.min.js'></script>
    <script type="text/javascript"src="http://cdn.staticfile.org/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
</head>
<body>
    <h1>阿里沙箱</h1>
    <div id = "qrid"></div>
    <div id = "div"></div>
</body>
<script>
    $(function(){
        var qrstr = "https://www.xxx.com/xxx/xxx";
        $.ajax({
            type: "GET",
            url: "http://localhost/ali/pay",
            dataType: "json",
            success: function(data){
                document.getElementById("div").innerHTML = data.content
                // $('#qrid').qrcode(data.alipay_trade_precreate_response.qr_code);//不指定二维码大写

            }
        });
        // $('#qrid').qrcode({width: 280,height: 280,text: qrstr});//指定二维码大小
    });
</script>
</html>